<?php
$sql = "
CREATE TABLE `ims_yuan_guaguale_game` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`weid` int(11) DEFAULT '0',
`bgimg` varchar(50) NOT NULL ,
`prizeid` varchar(50) NOT NULL COMMENT '刮刮乐奖品外接prize表id的字符串，中间用逗号隔开',
`gametype` tinyint(5) NOT NULL COMMENT '刮刮乐游戏模式：1为抽奖模式，2为积分模式',
`onetimepay` int(50) NOT NULL COMMENT '每刮卡一次消耗游戏积分',
`onedaytime` int(50) NOT NULL COMMENT '每天可以用的游戏机会',
`sharegettime` int(50) NOT NULL COMMENT '分享给朋友可以获得的游戏机会',
`firtimeget` int(50) NOT NULL COMMENT '第一次玩获取的游戏机会',
`status` tinyint(5) NOT NULL COMMENT '游戏开关',
`liquee` varchar(50) NOT NULL COMMENT '滚动虚拟数据',
`chance` varchar(50) NOT NULL COMMENT '中奖概率',
PRIMARY KEY (`id`)
)ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
CREATE TABLE `ims_yuan_guaguale_prize` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`weid` int(11) DEFAULT '0',
`prizename` varchar(50) NOT NULL,
`prizeimgurl` varchar(500) NOT NULL,
`prizetype` tinyint(5) NOT NULL COMMENT '1为虚拟奖品，2为实体商品，3为卡券，4为余额，5为积分',
`prizenumber` int(50) NOT NULL,
`chance` varchar(50) NOT NULL COMMENT '中奖概率',
PRIMARY KEY (`id`)
)ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;  
CREATE TABLE `ims_yuan_guaguale_member` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`weid` int(11) DEFAULT '0',
`uniacid` varchar(50) NOT NULL,
`sharetime` int(50) NOT NULL COMMENT '分享次数',
`payallpoint` int(50) NOT NULL COMMENT '支付总积分',
PRIMARY KEY (`id`)
)ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 
CREATE TABLE `ims_yuan_guaguale_history` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`weid` int(11) DEFAULT '0',
`uniacid` varchar(50) NOT NULL,
`prizename` varchar(50) NOT NULL COMMENT '获得奖品名称',
`gettime` varchar(50) NOT NULL COMMENT '获得时间',
PRIMARY KEY (`id`)
)ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; 
";
pdo_query($sql);